package com.ruoyi.web.es.task;

import com.ruoyi.common.annotation.Anonymous;
import com.thoughtworks.xstream.XStream;
import org.springframework.oxm.Marshaller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.view.xml.MarshallingView;

import java.time.LocalDateTime;
import java.util.Date;

@Anonymous
@RestController
public class taskController {

    @PostMapping("/fanhuis")
    public String test(){
        JackSonDemo jackSonDemo = new JackSonDemo();
        jackSonDemo.setUid(123456l);
        jackSonDemo.setName("苏二川");
        jackSonDemo.setNow(new Date());

        XStream xstream = new XStream();
        String xml = xstream.toXML(jackSonDemo);

        return xml;
    }
}
